package com.kehutong.auth.entity;

import com.kehutong.auth.enums.LoginMethod;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.KeyType;
import org.coraframework.orm.annotation.Table;

/**
 * 账号登录日志
 *
 * @author: liukunlong
 * @date: 2021-05-07 14:50
 */
@Table(value = "t_account_login_log", comment = "账户登录日志")
public class AccountLoginLog extends Entity {
    private static final long serialVersionUID = 296129229105462474L;

    protected AccountLoginLog(String id) {
        super(id);
    }

    @Column(length = 64, comment = "账户编号")
    private String accountNo;

    @Column(length = 64, comment = "登录IP")
    private String ip;

    @Column(length = 64, comment = "登录地址")
    private String address;

    @Column(length = 64, comment = "登录方式")
    private LoginMethod loginMethod;

    @Column(dbType = "TEXT", length = 65535, comment = "登录说明")
    private String remark;

    @JSONField(serialize = false)
    @Column(comment = "逻辑删除")
    private boolean deleted;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public LoginMethod getLoginMethod() {
        return loginMethod;
    }

    public void setLoginMethod(LoginMethod loginMethod) {
        this.loginMethod = loginMethod;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
